<template>
  <div class="box">
    <van-nav-bar
  title="标题"
  left-text="返回"
  left-arrow
  @click-left="onClickLeft"
/>
    <div class="btn" ref="btn">
      <van-button plain type="primary" @click="toRegister">注册</van-button>
      <van-button plain type="primary" @click="toLogin">登录</van-button>
    </div>
  </div>
</template>

<script setup lang="ts">
import router from "../router/index";
const toLogin = () => {
  router.push({ path: "/login" });
};
const toRegister = () => {
  router.push({ path: "/register" });
};
const onClickLeft = () => router.push("/layout/index");
</script>
<style lang="less" scoped>
.box {
  width: 100%;
  height: 100vh;
  // display: flex;
  justify-content: center;
  background: url(../../public/images/start.png);
  background-size: cover;
  .btn {
    width: 60%;
    height: 145px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 100%;
    margin-left: 73px;
    .van-button {
      width: 80%;
      height: 40px;
      color: #fff;
      margin-bottom: 20px;
      background: transparent;
      border-radius: 5px;
    }
  }
  .van-button:hover {
    background-color: #73adc8;
  }
}
</style>
